(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
last(nil) → 0
last(cons(x, nil)) → x
last(cons(x, cons(y, xs))) → last(cons(y, xs))
del(x, nil) → nil
del(x, cons(y, xs)) → if(eq(x, y), x, y, xs)
if(true, x, y, xs) → xs
if(false, x, y, xs) → cons(y, del(x, xs))
eq(0, 0) → true
eq(0, s(y)) → false
eq(s(x), 0) → false
eq(s(x), s(y)) → eq(x, y)
reverse(nil) → nil
reverse(cons(x, xs)) → cons(last(cons(x, xs)), reverse(del(last(cons(x, xs)), cons(x, xs))))
Rewrite Strategy: INNERMOST
(1) DecreasingLoopProof (EQUIVALENT transformation)
The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
last(cons(x, cons(y, xs))) →+ last(cons(y, xs))
gives rise to a decreasing loop by considering the right hand sides subterm at position [].
The pumping substitution is [xs / cons(y, xs)].
The result substitution is [x / y].
(2) BOUNDS(n^1, INF)